package cn.threecubic.springcloud.service.impl;

import cn.threecubic.springcloud.dao.StorageDao;
import cn.threecubic.springcloud.service.StorageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Terminator
 * @date 2021/12/12 23:06
 */
@Service
public class StorageServiceImpl implements StorageService {

    private static final Logger LOGGER = LoggerFactory.getLogger(StorageServiceImpl.class);

    @Autowired
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        LOGGER.info("==========storage扣库存开始");
        storageDao.decrease(productId, count);
        LOGGER.info("==========storage扣库存结束");
    }
}
